<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.ncp.model.biz.bbs.ArticleProcess"%>
<%@page import="com.ncp.model.entity.comment.Articlebean"%>
<%@page import="com.ncp.model.entity.article.ArticleBean"%>
<%@page import="com.ncp.model.biz.article.ArticleManager"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%
ArticleProcess ap=new ArticleProcess();
ArrayList<Articlebean> alist=ap.getArticle(1);
System.out.println(alist.size());
%>
<%
ArrayList<ArticleBean> al=new ArticleManager().getAllArticles("knowledge");

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>农产品</title>
<link rel="stylesheet" href="css/index.css" type="text/css" />

<link rel="stylesheet" href="css/world.css" type="text/css" />
<link rel="stylesheet" href="css/common.css" type="text/css" />
</head>
<body style="min-height:800px;">
<div id="allpage" style="min-height:800px;">
	<jsp:include flush="true" page="../index/head.jsp"></jsp:include>
	

	<div id="main">
		<div id="content" style="width:880px; margin:0 auto;">
			<!--最新资讯-->
			<div class="news">
				<div class="title" style="width:840px; background:url(images/absulote/title_1_long.png) no-repeat;">
					<p class="left">农作物知识</p>
					<p class="right"><a href="pages/agraculturWorld/KnowledgeList.jsp?type=knowledge">更多>></a></p>
				</div>
			<!--改动-->
				<div class="contain">
					<div class="competion special">
						<ul>
					<%
					if(al.size()<=10){
						for(int i=al.size()-1;i>=0;){
							ArticleBean ab=al.get(i);
							%>
							<li><a href="ArticleClServlet?type=content&id=<%=ab.getId()%>"><%=ab.getTitle() %></a></li>
							<%
							i=i-2;
						}
						%>
							</ul>
						</div>
						<div class="competion">
							<ul>
						<%
							for(int i=al.size()-2;i>=0;){
								ArticleBean ab=al.get(i);
								%>
								<li><a href="ArticleClServlet?type=content&id=<%=ab.getId()%>"><%=ab.getTitle() %></a></li>
								<%
								i=i-2;
							}
						}else{
							for(int i=9;i>=0;){
								ArticleBean ab=al.get(i);
								%>
								<li><a href="ArticleClServlet?type=content&id=<%=ab.getId()%>"><%=ab.getTitle() %></a></li>
								<%
								i=i-2;
							}
							%>
								</ul>
							</div>
							<div class="competion">
								<ul>
							<%
								for(int i=8;i>=0;){
									ArticleBean ab=al.get(i);
									%>
									<li><a href="ArticleClServlet?type=content&id=<%=ab.getId()%>"><%=ab.getTitle() %></a></li>
									<%
									i=i-2;
								}
						}
						%>
							</ul>
						</div>
					<div style="clear:both"></div>
				</div>
			<div style="clear:both"></div>
			</div>
			<!--改动-->
			<!--交流论坛-->
			<div class="news">
				<div class="title" style="width:840px; background:url(images/absulote/title_1_long.png) no-repeat;">
					<p class="left">交流园地</p>
					<p class="right"><a href="pages/bbs/showarticle.jsp">更多>></a></p>
				</div>
				<div class="contain">
					<div class="competion special debate">
						<ul>
						<%
						if(alist.size()>5){
							for(int i=0;i<5;i++){
								Articlebean ab=alist.get(i);
							%>
							<li><a class="title_debate" href="pages/bbs/showarticle.jsp">[标题]</a> <a href="ShowReplyServlet?id=<%=ab.getId() %>"><%=ab.getTitle() %></a></li>
							<%
							}
						}else if(alist.size()<=5){
							for(int i=0;i<alist.size();i++){
								Articlebean ab=alist.get(i);
							%>
							<li><a class="title_debate" href="pages/bbs/showarticle.jsp">[标题]</a> <a href="ShowReplyServlet?id=<%=ab.getId() %>"><%=ab.getTitle() %></a></li>
							<%
							}
						}
						%>
						</ul>
					</div>
					<div class="competion debate">
						<ul>
						<%
						if(alist.size()>5&&alist.size()<10){
							for(int i=5;i<alist.size();i++){
								Articlebean ab=alist.get(i);
							%>
							<li><a class="title_debate" href="pages/bbs/showarticle.jsp">[标题]</a> <a href="ShowReplyServlet?id=<%=ab.getId() %>"><%=ab.getTitle() %></a></li>
							<%
							}
						}else if(alist.size()>10){
							for(int i=5;i<10;i++){
								Articlebean ab=alist.get(i);
							%>
							<li><a class="title_debate" href="pages/bbs/showarticle.jsp">[标题]</a> <a href="ShowReplyServlet?id=<%=ab.getId() %>"><%=ab.getTitle() %></a></li>
							<%
							}
						}
						%>
							
						</ul>
					</div>
					<div style="clear:both"></div>
				</div>
				<div style="clear:both"></div>
			</div>
			

			<!--农场风貌-->
			<div class="news">
				<div class="title" style="width:840px; background:url(images/absulote/title_1_long.png) no-repeat;">
					<p class="left">农庄风采</p>
					<p class="right"><a href="pages/agraculturWorld/ArticleList.jsp?type=scenery">更多>></a></p>
				</div>
				<div class="contain">
					<div class="demo_img left">
						<a href="pages/agraculturWorld/ArticleList.jsp?type=scenery">
							<img src="images/buttom_0.jpg" width="160" height="170"/>
						</a>
					</div>
					<p class="word left"  style="width:670px;">
						上海耘丰农场位于苏州市吴中区金庭镇大桥路8号，毗邻太湖，占地约500余亩，是一座集旅游、餐饮、住宿、休闲、会务接待、拓展、娱乐、购物、及特色农产、手工艺品等多功能性休闲旅游度假村，并获得“全国农业旅游示范点”称号。园内设有水果采摘园、可爱动物区、香草花园、绿光广场、住宿区、温室养生餐饮区、休闲娱乐区、DIY教室、体能活动区等九大区。
						<span class="right more_font"><a href="pages/agraculturWorld/ArticleList.jsp?type=scenery">更多>></a></span>
					</p>
				</div>
				<div style="clear:both"></div>
			</div>
		</div>



		

	</div>

	

	<div id="slice">

	</div>

	

	<jsp:include flush="true" page="../index/foot.jsp"></jsp:include>

	

</div>



</body>

</html>


